#ifndef DOCUMENT_H
#define DOCUMENT_H

#include <iostream>

#include "date.h"

class Document
{
	public:
		enum Document_types
		{
			ORDER,///0
			BILL,///1
			CLAIM,///2
			TENDER///3
		};
		
		static std::string document_type_name(const int p_type);
		
		enum Exceptions
		{
			DATA_STRUCTURE_ERROR
		};
		
	protected:
		int type;
		int issue_no;
		Date date;
		std::string subject;
		std::string partner;
		int ref_no;
		int total;
	
	public:
		Document();

		Document(const int &p_tpye);

		~Document();

		int get_type() const;

		int get_issue_no() const;

		Date get_date() const;

		std::string get_subject() const;

		std::string get_partner() const;
		
		int get_total() const;

		int get_ref_no() const;

		friend std::ostream& operator<<(std::ostream &p_out_stream, const Document &p_document);

		friend std::istream& operator>>(std::istream &p_in_stream, Document &p_document);

};

#endif
